from flask_apscheduler import APScheduler
scheduler = APScheduler()    



# from flask_apscheduler import APScheduler
# class Scheduler(object):
#     """
#     利用__new__函数实现单例实例并且在文件中引用
#     其实使用一种均可以
#     """
#     _instance = None
#     APScheduler = None

#     def __new__(cls, *args, **kw):
#         if cls._instance is None:
#             cls.APScheduler = APScheduler()
#             cls._instance = object.__new__(cls, *args, **kw)
#         return cls._instance

#     def __init__(self):
#         pass


# scheduler = Scheduler().APScheduler  #直接在文件中引用（3方法)
